package com.yuexinduo.baselibrary.http;


import retrofit2.Retrofit;

public class Api {


    private volatile static Retrofit retrofit;

    public static Retrofit getRetrofit() {
        if (retrofit == null) {
            synchronized (Api.class) {
                if (retrofit == null) {
                    new Api();
                }
            }
        }
        return retrofit;
    }

    private Api() {
        BaseApi baseApi = new BaseApi();
        retrofit = baseApi.getRetrofit(Constant.BASE_URL);
    }
}
